<template>
<uni-shadow-root class="partials-nearShop-near_shop_slide-near_shop_slide"><template name="near_shop_slide">
<block v-if="shops.length >= "1"">
    <view class="top">
    <view class="topTitle">优质商家</view>
    <view class="topImg"><image mode="aspectFit" src="https://image1.sansancloud.com/xianhua/2019_12/12/13/50/4_17.jpg?x-oss-process=style/preview_120" @click="tolinkUrl" data-link="near_shops.html"></image></view>
    </view>
    <scroll-view class="near_shop_wrapp" scroll-x="true">
    <block v-for="(item,index) in (shops)" :key="item.index">
        <view class="near_shop_box" :data-id="item.id" :data-index="index" :data-link="'near_shop_page.html?addShopId='+(item.id)" @click="tolinkUrl">
            <view class="near_shop_banner">
                 <view class="near_shop_banner_img" v-if="item.shopBanner&&item.shopBanner!=''"><image mode="scaleToFill" :src="item.shopBanner"></image></view>
                 <view class="near_shop_banner_img" v-else><image mode="scaleToFill" src="https://image1.sansancloud.com/xianhua/2020_1/2/18/36/36_931.jpg?x-oss-process=style/preview"></image></view>
                 <view class="haoPing">100%好评</view>
                 <view class="near_shop_logo" v-if="item.shopLogo&&item.shopLogo!=''"><image mode="scaleToFill" :src="item.shopLogo"></image></view>
                 <view class="near_shop_logo" v-else><image mode="scaleToFill" src="https://image1.sansancloud.com/xianhua/2020_1/2/18/36/36_931.jpg?x-oss-process=style/preview"></image></view>
            </view>
            <view class="near_shop_name">{{item.shopName}}</view>
            <view class="near_shop_shopTag" v-if="item.shopTag&&item.shopTag!=''">
              <block v-for="(item,index) in (item.shopTag)" :key="item.index">
              <view class="near_shop_shopTag_item" v-if="index<=2&&item!=''" :style="'border:2px solid '+(defaultColor)+';'">{{item}}</view>
              </block>
            </view>
            <view class="near_shop_shopTag" v-else>
              <view class="near_shop_shopTag_item" :style="'border:2px solid '+(defaultColor)+';'">暂无标签</view>
            </view>
        </view>
    </block> 
    </scroll-view>
</block>
<block v-if="shops.length==0">
    <view class="noproduct">
      <image mode="widthFix" src="https://image1.sansancloud.com/xianhua/2019_12/16/15/54/55_950.jpg?x-oss-process=style/preview_120"></image>
      <text>没有相关店铺</text>
    </view>
</block>





</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/nearShop/near_shop_slide/near_shop_slide'

Component({})

export default global['__wxComponents']['partials/nearShop/near_shop_slide/near_shop_slide']
</script>
<style platform="mp-weixin">
.top{
  width: 684rpx;
  height: 75rpx;
  display: flex;
  flex-direction: row;
  padding-top: 25rpx;
  padding-left: 34rpx;
  padding-right: 32rpx;
  justify-content: space-between;
}
.topTitle{
  width:154rpx;
  height:50rpx;
  font-size:36rpx;
  font-family:PingFangSC-Medium;
  font-weight:500;
  color:rgba(51,51,51,1);
  line-height:50rpx;
}
.topImg{
  width: 30rpx;
  height: 38rpx;
}
.topImg image{
  width: 100%;
  height: 100%;
}
/* 滑动部分 */
.near_shop_wrapp{
  width: 100%;
  height: 364rpx;
  white-space: nowrap;
  display: flex;
}
.near_shop_box {
   width: 320rpx;
   height: 360rpx;
   display: inline-block;
   margin-left: 24rpx;
   position: relative;
}
.near_shop_banner{
  width: 320rpx;
  height: 264rpx;
  overflow: hidden;
  position: relative;
}
.near_shop_banner_img{
  width: 320rpx;
  height: 220rpx;
  overflow: hidden;
}
.near_shop_banner_img image{
  width: 100%;
  height: 100%;
}
.haoPing{
height:40rpx;
font-size:28rpx;
font-family:PingFangSC-Regular;
font-weight:400;
color:rgba(175,179,187,1);
line-height:40rpx;
}
/* 定位的logo */
.near_shop_logo{
  width:58rpx;
  height:58rpx;
  border-radius: 68rpx;
  padding: 10rpx;
  position: absolute;
  right: 40rpx;
  bottom: 0rpx;
  background-color:white;
  overflow: hidden;
}
.near_shop_logo image{
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
/* 店铺名 */
.near_shop_name{
 height:40rpx;
font-size:28rpx;
font-family:PingFangSC-Regular;
font-weight:400;
color:rgba(51,51,51,1);
line-height:40rpx;
}

/* 店铺标签 */
.near_shop_shopTag{
height:54rpx;
display: flex;
flex-direction: row;
}
.near_shop_shopTag_item{
height:34rpx;
border-radius:8rpx;
font-size: 20rpx;
margin-right: 10rpx;
padding: 5rpx;
line-height: 34rpx;
}
</style>